<html>
<head><meta charset="utf-8"><title>empty error annotations on ui tests · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/empty.20error.20annotations.20on.20ui.20tests.html">empty error annotations on ui tests</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="189779463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/empty%20error%20annotations%20on%20ui%20tests/near/189779463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/empty.20error.20annotations.20on.20ui.20tests.html#189779463">(Mar 05 2020 at 10:58)</a>:</h4>
<p><span class="user-mention silent" data-user-id="126931">centril</span> <a href="#narrow/stream/131828-t-compiler/topic/ui.20test.20comments/near/189776720" title="#narrow/stream/131828-t-compiler/topic/ui.20test.20comments/near/189776720">said</a>:</p>
<blockquote>
<p>(Please don't do that though)</p>
</blockquote>
<p>why not? The exact message is handled in the .stderr files, the annotations are mostly there to ensure we keep emitting an error at that position. It may help readers a bit if there's some message part, but the worry that the error changes completely seems irrelevant to me, because it's still an error, even if a different one now</p>



<a name="189779506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/empty%20error%20annotations%20on%20ui%20tests/near/189779506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/empty.20error.20annotations.20on.20ui.20tests.html#189779506">(Mar 05 2020 at 10:59)</a>:</h4>
<p>The only thing we could change would be to treat lints and errors differently. So <code>//~ DENY_LINT</code> for lints and <code>//~ ERROR</code> for hard errors</p>



<a name="189780267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/empty%20error%20annotations%20on%20ui%20tests/near/189780267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/empty.20error.20annotations.20on.20ui.20tests.html#189780267">(Mar 05 2020 at 11:10)</a>:</h4>
<p>why the error happens is important, and also the readability aspect you mentioned</p>



<a name="189781088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/empty%20error%20annotations%20on%20ui%20tests/near/189781088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/empty.20error.20annotations.20on.20ui.20tests.html#189781088">(Mar 05 2020 at 11:22)</a>:</h4>
<p>I understand that why the error happens is important, but that info is in the ui test</p>



<a name="189781114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/empty%20error%20annotations%20on%20ui%20tests/near/189781114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/empty.20error.20annotations.20on.20ui.20tests.html#189781114">(Mar 05 2020 at 11:22)</a>:</h4>
<p>and not losing an error is more important than message changes</p>



<a name="189781557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/empty%20error%20annotations%20on%20ui%20tests/near/189781557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/empty.20error.20annotations.20on.20ui.20tests.html#189781557">(Mar 05 2020 at 11:29)</a>:</h4>
<p>why the error happens can also be important in terms of semver (e.g. if an error is moved to after parsing), so the test suite should be resistant to simply overwriting them via <code>--bless</code></p>



<a name="189781575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/empty%20error%20annotations%20on%20ui%20tests/near/189781575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/empty.20error.20annotations.20on.20ui.20tests.html#189781575">(Mar 05 2020 at 11:30)</a>:</h4>
<p>plus, it makes for easier reviews if you can mainly look at the .rs files and skim the .stderr files</p>



<a name="189800689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/empty%20error%20annotations%20on%20ui%20tests/near/189800689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/empty.20error.20annotations.20on.20ui.20tests.html#189800689">(Mar 05 2020 at 15:10)</a>:</h4>
<p>I go back and forth on this -- but as I noted elsewhere, I tend feel that a "distinctive substring" is good. Too much detail is counterproductive imo as well (harder to read...)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>